<?php

namespace app\api\controller;

header('Access-Control-Allow-Origin:*');
class Member extends Base
{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'only' => ''
        ],
    ];

    /**
     * 获取授权
     */
    public function login()
    {
        $result =  (new \app\api\logic\Member())->login();
        return $this->ajaxReturn($result);
    }

    /**
     * 绑定会员
     */
    public function bind()
    {
        $result =  (new \app\api\logic\Member())->bind();
        return $this->ajaxReturn($result);
    }

    /**
     * 用户信息
     */
    public function info()
    {
        $result =  (new \app\api\logic\Member())->info();
        return $this->ajaxReturn($result);
    }

    /**
     * 签到功能
     */
    public function sign()
    {
        $result =  (new \app\api\logic\Member())->sign();
        return $this->ajaxReturn($result);
    }

    /**
     * 积分记录
     */
    public function sign_record()
    {
        $result =  (new \app\api\logic\Member())->sign_record();
        return $this->ajaxReturn($result);
    }

    /**
     * 兑换奖品
     */
    public function exchange_prize()
    {
        $result =  (new \app\api\logic\Member())->exchange_prize();
        return $this->ajaxReturn($result);
    }

    /**
     * 兑换
     */
    public function exchange()
    {
        $result =  (new \app\api\logic\Member())->exchange();
        return $this->ajaxReturn($result);
    }

    /**
     * 兑换记录
     */
    public function exchange_record()
    {
        $result =  (new \app\api\logic\Member())->exchange_record();
        return $this->ajaxReturn($result);
    }

    /**
     * 大转盘记录
     */
    public function wheel_record()
    {
        $result =  (new \app\api\logic\Member())->wheel_record();
        return $this->ajaxReturn($result);
    }

    /**
     * 砸金蛋记录
     */
    public function egg_record()
    {
        $result =  (new \app\api\logic\Member())->egg_record();
        return $this->ajaxReturn($result);
    }

    /**
     * 摇一摇记录
     */
    public function shake_record()
    {
        $result =  (new \app\api\logic\Member())->shake_record();
        return $this->ajaxReturn($result);
    }
}